/**
 * @author:fangxiaohua
*  @邮箱：abc2710712@qq.com
*  @qq:1295168875
*  常量定义
*/
(function(exports){
	
	//数据库连接常量
	exports.DB_CONFIG	= {"host":'60.194.51.17',"port":'3306',"database":"yunlu_admin","charset":"UTF8_GENERAL_CI","user":"root","password":"YUNLU!@#qwe"};
	
	//web服务配置
	exports.WEB_CONFIG={ "port":process.env.PORT || 8081,"viewfolder":"views","publicfolder":"assets","viewsuffix":"html","session_maxAge":1800000,"skip_loginValid":["/login","/ulogin","/register","/findpwd"]};
	
	exports.CHAT_CONFIG={
			"port":process.env.PORT || 9090,
			"host":"127.0.0.1",
			"event_type":{'LOGIN':'LOGIN', 'LOGOUT':'LOGOUT', 'SPEAK':'SPEAK', 'LIST_USER':'LIST_USER', 'ERROR':'ERROR', 'LIST_HISTORY':'LIST_HISTORY'}
	};
	
	//用户操作相关常量
	exports.USER_CONFIG={
			//登录状态
			"login_status":{
					"error":{"status":0,"info":"系统错误,登录失败!"},
					"success":{"status":1,"info":"登录成功!"},
					"user_error":{"status":2,"info":"用户名或密码错误!"}
			},
			//找回密码状态
			"findpwd_status":{
				"error":{"status":0,"info":"系统错误,密码找回失败!"},
				"success":{"status":1,"info":"密码找回成功!"},
				"info_error":{"status":2,"info":"信息错误,验证未通过!"}
			},
			//注册状态
			"register_status":{
				"error":{"status":0,"info":"系统错误,注册失败!"},
				"success":{"status":1,"info":"注册成功!"},
				"account_repeat":{"status":2,"info":"该账号已被使用!"}
			},
			//修改密码状态
			"editpwd_status":{
				"error":{"status":0,"info":"系统错误,修改密码失败!"},
				"success":{"status":1,"info":"密码修改成功!"},
				"oldpwd_error":{"status":2,"info":"原密码不正确!"}
			},
	};
	
})((function(){
    if(typeof exports === 'undefined') {
        window.chatLib = {};
        return window.chatLib;
    } else {
        return exports;
    }
})() );